package com.web;

import com.pojo.dto.Message;
import com.pojo.vo.TopPickTicketVo;
import com.pojo.vo.TopPickVo;
import com.service.TopPickService;
import com.service.TopPickTicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TopPickTicketController {
    @Autowired
    TopPickTicketService topPickTicketService;

    @PostMapping("/ticketlist")
    public Message<List<TopPickTicketVo>> findList(TopPickTicketVo topPickTicketVo) {
        return topPickTicketService.list(topPickTicketVo);
    }

    @PostMapping("/ticketone")
    public Message<TopPickTicketVo> get(TopPickTicketVo topPickTicketVo) {
        return topPickTicketService.get(topPickTicketVo);
    }

    @PostMapping("/ticket/add")
    public Message<TopPickTicketVo> add(TopPickTicketVo topPickTicketVo) {
        return topPickTicketService.add(topPickTicketVo);
    }

    @PostMapping("/ticket/delete")
    public Message<TopPickTicketVo> delete(TopPickTicketVo topPickTicketVo) {
        return topPickTicketService.delete(topPickTicketVo);
    }

    @PostMapping("/ticket/edit")
    public Message<TopPickTicketVo> edit(TopPickTicketVo topPickTicketVo) {
        return topPickTicketService.edit(topPickTicketVo);
    }

}
